#ifndef COURSE_OBJECT_H
#define COURSE_OBJECT_H

#include "TopMarkObject.h"

#include <object_v2/object_v2.h>

OBJECT_DECLARE (CourseObject, course_object)
#define COURSE_OBJECT(any) ((CourseObject*)(any))
struct _CourseObject
{
        Object                   parent_instance;
        ObjectStringApplication* sch; // sch 文件文本内容

        TopMarkObject*           top_mark_head;
        TopMarkObject*           course_top_mark_start;
        DateObject*              start_date;
        DateObject*              today;
        ObjectString*            student_info;
        ObjectString*            table[15][8];
        ObjectString*            _error;
        int                      current_week;
        bool                     is_init;
};

/**
 * @brief 打开 sch 文件
 * @param sch_file_path sch 文件路径
 * @return 1: 打开有误，0: 打开成功，无误。
 */
int  course_object_load_sch (CourseObject* obj, const char* sch_file_path);

int  course_object_analysis_sch (CourseObject* obj);

void course_object_show_course_of_prev_week (CourseObject* course);

void course_object_show_course_of_next_week (CourseObject* course);

void course_object_add_all_course_in_current_week (CourseObject* course);

#endif